package com.csun.dsms.model.dto.poor;

import com.csun.dsms.validator.*;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.persistence.Column;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author chisj chisj@foxmail.com
 * @version 1.0.0
 * @date 2021-09-22 9:53
 * @description: TODO
 */
@Data
public class PoorDto {

    /**
     * 特困人员id
     */
    @NotNull(message = "{poor.id.null}",
            groups = {DsmsPoorEditValidator.class})
    private Long id;

    /**
     * 单位id
     */
//    @NotNull(message = "{unit.id.null}",
//            groups = {DsmsPoorEditValidator.class})
    private Long unitId;

    /**
     * 姓名
     */
    @NotNull(message = "{poor.name.null}",
            groups = {DsmsPoorAddValidator.class})
    @NotEmpty(message = "{poor.name.null}",
            groups = {DsmsPoorAddValidator.class})
    private String name;

    /**
     * 性别 1-男 0-女
     */
    @NotNull(message = "{poor.sex.null}",
            groups = {DsmsPoorAddValidator.class})
    @Range(min = 0, max = 2, message = "{poor.sex.range.error}",
            groups = {DsmsPoorAddValidator.class})
    private Integer sex;

    /**
     * 出生日期，格式yyyy-mm-dd
     */
    @NotNull(message = "{poor.birthday.null}",
            groups = {DsmsPoorAddValidator.class})
    @NotEmpty(message = "{poor.birthday.null}",
            groups = {DsmsPoorAddValidator.class})
    private String birthday;

    /**
     * 身份证编号
     */
    @NotNull(message = "{poor.id.card.null}",
            groups = {DsmsPoorAddValidator.class})
    @NotEmpty(message = "{poor.id.card.null}",
            groups = {DsmsPoorAddValidator.class})
    private String idCard;

    /**
     * 家庭住址
     */
//    @NotNull(message = "{poor.home.address.null}",
//            groups = {DsmsPoorAddValidator.class})
//    @NotEmpty(message = "{poor.home.address.null}",
//            groups = {DsmsPoorAddValidator.class})
    private String homeAddress;

    /**
     * 大地经纬度 经度,纬度
     */
//    @NotNull(message = "{poor.location.wgs.null}",
//            groups = {DsmsPoorAddValidator.class})
//    @NotEmpty(message = "{poor.location.wgs.null}",
//            groups = {DsmsPoorAddValidator.class})
    private String locationWgs;

    /**
     * 位置
     */
//    @NotNull(message = "{poor.location.null}",
//            groups = {DsmsPoorAddValidator.class})
//    @NotEmpty(message = "{poor.location.null}",
//            groups = {DsmsPoorAddValidator.class})
    private String location;

    /**
     * 民族
     */
//    @NotNull(message = "{poor.nation.null}",
//            groups = {DsmsPoorAddValidator.class})
//    @NotEmpty(message = "{poor.nation.null}",
//            groups = {DsmsPoorAddValidator.class})
    private String nation;

    /**
     * 头像
     */
    private String headPic;

    /**
     * 自理能力 1-全失能 2-半失能 3-全自理
     */
    @NotNull(message = "{poor.self.care.ability.null}",
            groups = {DsmsPoorAddValidator.class})
    @Range(min = 1, max = 3, message = "{poor.self.care.ability.range.error}",
            groups = {DsmsPoorAddValidator.class})
    private Integer selfCareAbility;

    /**
     * 是否残疾 0-否 1-是
     */
    @NotNull(message = "{poor.is.disability.null}",
            groups = {DsmsPoorAddValidator.class})
    @Range(min = 0, max = 1, message = "{poor.is.disability.range.error}",
            groups = {DsmsPoorAddValidator.class})
    private Integer isDisability;

    /**
     * 是否老年人 0-否 1-是
     */
    @NotNull(message = "{poor.is.elderly.null}",
            groups = {DsmsPoorAddValidator.class})
    @Range(min = 0, max = 1, message = "{poor.is.elderly.range.error}",
            groups = {DsmsPoorAddValidator.class})
    private Integer isElderly;

    /**
     * 是否未成年人 0-否 1-是
     */
    @NotNull(message = "{poor.is.minor.null}",
            groups = {DsmsPoorAddValidator.class})
    @Range(min = 0, max = 1, message = "{poor.is.minor.range.error}",
            groups = {DsmsPoorAddValidator.class})
    private Integer isMinor;

    /**
     * 供养方式 1-集中 2-分散
     */
    @NotNull(message = "{poor.support.way.null}",
            groups = {DsmsPoorAddValidator.class})
    @Range(min = 1, max = 2, message = "{poor.support.way.range.error}",
            groups = {DsmsPoorAddValidator.class})
    private Integer supportWay;

    /**
     * 登记时间 yyyy-MM-dd
     */
    @NotNull(message = "{poor.check.in.null}",
            groups = {DsmsPoorAddValidator.class})
    @NotEmpty(message = "{poor.check.in.null}",
            groups = {DsmsPoorAddValidator.class})
    private String checkIn;

    /**
     * 备注
     */
    private String remark;

    /**
     * 特困人员服务项目
     */
    private List<Long> projectIdList;



    // 镇
    private Long town;

    // 村居
    private Long village;

    // 残疾类别（视力、听力、言语、肢体、智力、精神、多重）
    private String disabilityType;

    // 残疾详情
    private String disabilityDetails;

    // 是否独居
    private String isLivingAlone;

    // 共同居住人
    private String cohabitantName;

    // 特困人员电话
    private String phone;

    // 近亲属姓名
    private String kinsfolkName;

    // 近亲属关系
    private String kinsfolkRelation;

    // 近亲属电话
    private String kinsfolkPhone;

}
